<template>
	<div class="root">
		<el-button @click="onClick">TEST</el-button>
		<el-dialog title="裁切图片" :visible.sync="cropperModel" width="950px" 
			append-to-body :close-on-click-modal="false" v-if="cropperModel">
			<lilo-cropper @uploadImage="uploadImage" returnType="base64" :buttonName="buttonName"></lilo-cropper>
		</el-dialog>
	</div>
</template>

<script>
export default {
	name: 'example-cropper',
	data() {
		return {
			cropperModel: false,
			buttonName: '保存'
		};
	},
	methods: {
		onClick() {
			this.cropperModel = true;
		},
		uploadImage(data) {
			console.log(data);
			// this.cropperModel = false;
		}
	}
};
</script>
<style scoped>
</style>
